package com.dzf.controller;

import com.dzf.entity.LargeFile;
import com.dzf.service.LargeFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author DZF
 * 图片的公共模块
 */
@RestController
@RequestMapping("/api/public/largefile")
public class LargeFileController {
    @Autowired
    LargeFileService largeFileService;


    /**
     * 添加文件信息
     * @param largeFile 图片信息的实体类
     */
    @RequestMapping("/addLargefile")
    public void addLargefile(LargeFile largeFile){
        largeFileService.addLargeFile(largeFile);
    }

    /**
     * 查询文件详情
     * @param id 文件的ID
     * @return 文件的详情信息
     */
    @RequestMapping("/findByPic")
    public LargeFile findByPic(String id)
    {
        LargeFile largeFile = largeFileService.findByPic(id);
        return largeFile;
    }
}
